<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ page language="java" contentType="text/html; UTF-8"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; UTF-8">
<link rel="stylesheet" href="css/style.css" type="text/css"/>
<script type="text/javascript">
	function fnLogin() {
		if (document.getElementById("userName").value == '') {
			alert("Please Enter 'User Id'. ");
			return false;
		} else if (document.getElementById("password").value == '') {
			alert("Please Enter 'Password'. ");
			return false;
		} else {
			document.loginForm.method = "POST";
			document.loginForm.action = "loginAction.do?subAction=ValidateUser";
			document.loginForm.submit();
			//window.open("/Yunysha/jsp/home.jsp","_self");
		}
	}
</script>
<title>Login</title>
</head>
<body>
	<div id="main_container">
		<jsp:include page="header.jsp" />
		<html:form method="post" action="/loginAction.do">
			<div id="main_container">
				<table align='center'>
					<tr>
						<td width='900'>
							<div style='width: 900px; margin: 20px auto;'>
								<div style="width: 880px; background: #fff;">
									<div class="header">

										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="63%">&nbsp;</td>
												<td width="37%">&nbsp;</td>
											</tr>
											<tr>
												<td height="39">&nbsp;</td>
												<td>&nbsp;</td>
											</tr>
											<tr>
												<td height="26">&nbsp;</td>
												<td class="admittest"></td>
											</tr>
											<tr>
												<td>&nbsp;</td>
												<td>&nbsp;</td>
											</tr>
										</table>
									</div>

									<div class="container">
										<div class="applicationhead">LOGIN</div>
										<div>
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td colspan="2">
														<div id="container-11">
															<div id="fragment-29">
																<table width="100%" border="0" cellspacing="0"
																	cellpadding="0">
																	<tr>
																		<td class="sectionheading">User Login</td>
																	</tr>
																	<tr>
																		<td>
																			<div class="notes" align="center"
																				id="ERROR_PLACE_DIV"></div>
																		</td>
																	</tr>
																	<tr>
																		<td>&nbsp;</td>
																	</tr>
																	<tr>
																		<td>
																			<table width="100%" border="0" cellspacing="0"
																				cellpadding="5">
																				<tr>
																					<td colspan="3">&nbsp;</td>
																				</tr>
																				<tr>
																					<td width="4%">&nbsp;</td>
																					<td width="28%" align="right" valign="top">User
																						Id</td>
																					<td width="68%" valign="top"><html:text
																							property="userName" styleId="userName" size="15"
																							maxlength="15" styleClass="text_field" /></td>
																				</tr>
																				<tr>
																					<td width="4%">&nbsp;</td>
																					<td width="28%" align="right" valign="top">Password</td>
																					<td width="68%" valign="top"><html:password
																							property="password" styleId="password" size="15"
																							maxlength="15" styleClass="text_field" /></td>
																				</tr>
																			</table>
																		</td>
																	</tr>
																</table>

																<div class="butonhldr">
																	<table width="100%" border="0" cellspacing="0"
																		cellpadding="0">
																		<tr>
																			<td width="37%" align="right"></td>
																			<td width="63%" align="left"><input
																				type="button" name="button1" value="Login..."
																				style="background: #C2E3F4;" onclick="fnLogin()" /></td>
																		</tr>
																	</table>
																</div>

															</div>
														</div>
													</td>
												</tr>
											</table>
										</div>
									</div>
									<br />
								</div>

							</div>
						</td>
					</tr>
				</table>
			</div>
			<%
				String strError = "";
				if (request.getAttribute("errorMsg") != null)
					strError = (String) (request.getAttribute("errorMsg"));
	
				if (strError != null && !strError.equals("")) { %>
				<script>
					document.getElementById("ERROR_PLACE_DIV").innerHTML = '<%=strError.toString()%>';
				</script>
			<%
				}
			%>
		</html:form>
	</div>
</body>
</html:html>